<template>
  <div>
    <index-cmpt :models="models"></index-cmpt>
  </div>
</template>

<script>
import IndexCmpt from '@/credit/views/city/bus/index/IndexCmpt'
import { mapGetters } from 'vuex'
export default {
  components: {
    IndexCmpt,
  },
  props: {},
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['taskCountBusSelf', 'user']),
    scopes() {
      return this.user.scopes
    },
    authority() {
      const scopeArray = this.scopes.split('|')
      return scopeArray.includes('dirGua')
    },
    models() {
      return [
        {
          title: '项目受理',
          subTitle: '待办',
          subCount: this.taskCountBusSelf.todo_invest_total || 0,
          url: '/credit/task/union/routine/approval',
          handlerUrl: '/credit/task/union/routine/approval_no',
        },
        {
          title: '函件处理',
          subTitle: '待办',
          subCount: this.taskCountBusSelf.todo_invest_total || 0,
          url: '/credit/task/union/routine/letter',
          handlerUrl: '/credit/task/union/routine/letter_no',
        },
        {
          title: '贷后管理',
          subTitle: '到期',
          subCount: this.taskCountBusSelf.todo_exp_total || 0,
          url: '/credit/task/union/routine/postloan',
          handlerUrl: '/credit/task/union/routine/postloan_no',
        },
      ]
    },
  },
  watch: {},
  created() {
    this.$store.dispatch('getTaskCountBusSelf')
  },
  mounted() {},
  methods: {},
}
</script>

<style lang="scss" scoped></style>
